home *** CD-ROM | disk | FTP | other *** search
/ Clickx 63 / Clickx 63.iso / software / multimedia / mirov204 / Miro_Installer.exe / xulrunner / chrome / toolkit.jar / content / global / editMenuOverlay.js < prev    next >
Encoding:
JavaScript  |  2008-01-25  |  1.2 KB  |  36 lines

  1. //@line 38 "/e/xr19rel/WINNT_5.2_Depend/mozilla/toolkit/content/editMenuOverlay.js"
  2.  
  3. // update menu items that rely on focus or on the current selection
  4. function goUpdateGlobalEditMenuItems()
  5. {
  6.   // Don't bother updating the edit commands if they aren't visible in any way
  7.   // (i.e. the Edit menu isn't open, nor is the context menu open, nor have the
  8.   // cut, copy, and paste buttons been added to the toolbars) for performance.
  9.   // This only works in applications/on platforms that set the gEditUIVisible
  10.   // flag, so we check to see if that flag is defined before using it.
  11.   if (typeof gEditUIVisible != "undefined" && !gEditUIVisible)
  12.     return;
  13.  
  14.   goUpdateCommand("cmd_undo");
  15.   goUpdateCommand("cmd_redo");
  16.   goUpdateCommand("cmd_cut");
  17.   goUpdateCommand("cmd_copy");
  18.   goUpdateCommand("cmd_paste");
  19.   goUpdateCommand("cmd_selectAll");
  20.   goUpdateCommand("cmd_delete");
  21.   goUpdateCommand("cmd_switchTextDirection");
  22. }
  23.  
  24. // update menu items that relate to undo/redo
  25. function goUpdateUndoEditMenuItems()
  26. {
  27.   goUpdateCommand("cmd_undo");
  28.   goUpdateCommand("cmd_redo");
  29. }
  30.  
  31. // update menu items that depend on clipboard contents
  32. function goUpdatePasteMenuItems()
  33. {
  34.   goUpdateCommand("cmd_paste");
  35. }
  36.